﻿using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Runnergame.View
{
    class PlayerView
    {
        Texture2D runnerTexture;
        Vector2 runnerPosition;
        Model.Player m_player;

        public PlayerView()
        {
            runnerPosition = new Vector2(300, 300);
        }

        internal void LoadContent(ContentManager content) 
        {

            runnerTexture = content.Load<Texture2D>("temprunner1.png");
                
        }
        internal void Draw(SpriteBatch spriteBatch, Model.Player player, Camera camera) 
        {
            m_player = player;
            Rectangle playerRect = camera.getVisualRect(player.playerPosition.X, player.playerPosition.Y, 0.3f);
            spriteBatch.Draw(runnerTexture, playerRect, Color.White);
        
        }
    }
}
